<?php
function tep_session_is_registered($variable) 
{
	if (PHP_VERSION < 4.3) 
	{
		return session_is_registered($variable);
	} 
	else 
	{
		return isset($_SESSION) && array_key_exists($variable, $_SESSION);
	}
}
if(!tep_session_is_registered(LOGIN_SESSION_NAME))
{	
	$source = selfURL();		
	$source = urlencode($source);
//	if(curPageName() != "login.php")
	if(in_array($module, $arr_no_login_require_module) == FALSE)
	{
		$login_URL = "index.php?module=login&source=" . $source;
//		var_dump($login_URL);
		header('Location: ' . "index.php?module=login&source=" . $source );
	}
}
$permission = "P";
if($user_type_login == 'Administrator' || $user_type_login == "Admin")
{
	$permission = "F";
}
else if($user_type_login == 'Player')
{
	$permission = "P";
}
else
{
	
}
define('PERMISSION', $permission);
?>